#ifndef GAMECONTROLLER_H
#define GAMECONTROLLER_H

#include "mainscene.h"
#include "levelscene.h"
#include "gamescene.h"


class GameController
{
public:
    GameController();
    ~GameController();
    //单例
    static GameController *getInstance();
    //
    void initMainScene(MainScene *scene);
    void showMainScene();
    void hideMainScene();
    void showLevelScene();
    void hideLevelScene();
    void showGameScene(int level);
    void hideGameScene();
    void deleteGameScene();

    //播放音效
    void playStartSound();
    void playBackSound();
    void playFlipCoinSound();
    void playWinSound();

private:
    static GameController *s_instance;

    MainScene *m_mainScene;
    LevelScene *m_levelScene;
    GameScene *m_gameScene;

    QRect m_curGeometry;
    QPoint m_curPos;
};

#endif // GAMECONTROLLER_H
